import { herinRequist } from "../http.js";
// 机器人下单
const DeliveryOrder = {
	//室内
	getDeliveryBuilding() {
		return herinRequist({ url: '/app/delivery-building', method: 'GET' });
	},
	getBaseDeliveryStation(area_id) {
		return herinRequist({ url: '/app/base-delivery-station', method: 'GET' ,data: { area_id } ,contentType:'application/json' });
	},
	getDeliveryStation(area_id) {
		return herinRequist({ url: '/app/delivery-station', method: 'GET',data: { area_id } ,contentType:'application/json' });
	},
	addDeliveryStation(obj) {
		return herinRequist({ url: '/app/add-delivery-station', method: 'POST', data: JSON.stringify( { obj } ), contentType:'application/json' });
	},
	deleteDeliveryStation(ids) {
		return herinRequist({ url: '/app/del-delivery-station', method: 'POST', data: JSON.stringify( { ids } ), contentType:'application/json' });
	},
	createDelivery(obj) {
		return herinRequist({ url: '/app/create-delivery', method: 'POST', data: JSON.stringify( { isTest :false, obj } ), contentType:'application/json' });
	},
	getMyIndentList(data) {
		return herinRequist({ url: '/app/delivery-list', method: 'GET', data ,contentType:'application/json'});
	},
	getDetails(id) {
		return herinRequist({ url: '/app/delivery-detail', method: 'GET', data: { id } ,contentType:'application/json'});
	},
	postCencel(data) {
		return herinRequist({ url: '/app/cancel-delivery', method: 'POST', data ,contentType:'application/json'});
	},
	// 室外
	postCreateOrder(data) {
		return herinRequist({ url: '/app/create-order', method: 'POST', data ,contentType:'application/json'});
	},
	getSiteList() {
		return herinRequist({ url: '/app/site-list', method: 'GET'});
	},
	getOrderList(data) {
		return herinRequist({ url: '/app/order-list', method: 'GET', data });
	},
	getRouteList(data) {
		return herinRequist({ url: '/app/route-list', method: 'GET', data });
	},
	getOrderDetails(order_id) {
		return herinRequist({ url: '/app/order-details', method: 'GET',  data: { order_id } });
	},
	getCarCabinet(car_id) {
		return herinRequist({ url: '/app/car-cabinet', method: 'GET',  data: { car_id } });
	},
	postCancelOrder(data) {
		return herinRequist({ url: '/app/cancel-order', method: 'POST',  data ,contentType:'application/json'});
	},
	postCompleteOrder(data) {
		return herinRequist({ url: '/app/complete-order', method: 'POST',  data ,contentType:'application/json'});
	},
	postCreateTask(data) {
		return herinRequist({ url: '/app/create-task', method: 'POST',  data ,contentType:'application/json'});
	},
	postCarList(data) {
		return herinRequist({ url: '/app/car-list', method: 'POST',  data ,contentType:'application/json'});
	},
	postCarSetout(data) {
		return herinRequist({ url: '/app/car-setout', method: 'POST',  data ,contentType:'application/json'});
	},
	postCreateDynamic(data) {
		return herinRequist({ url: '/app/create-dynamic-route', method: 'POST',  data ,contentType:'application/json'});
	},
	postOpen(data) {
		return herinRequist({ url: '/app/open-cabinet', method: 'POST',  data ,contentType:'application/json'});
	},
	postPutCar(data) {
		return herinRequist({ url: '/app/put-car', method: 'POST',  data ,contentType:'application/json'});
	},
	getByRoute(route_id){
		return herinRequist({ url: '/app/order-list-by-route', method: 'GET', data: { route_id }});
	},
	
	
}

export default DeliveryOrder;